#ifndef SYSCALL_HPP
#define SYSCALL_HPP

class SysCall{
  private:
    unsigned long start;
    int retVal;
  public:
    SysCall();

    SysCall(unsigned long s, int v);

    virtual int runCall();

    unsigned long getStart();

    int getRetVal();
};

class SysRead : public SysCall{
  private:
    int fd, num;
    char buf[1000];
  public:
    SysRead(unsigned long s, int v, int f, const int n);

    int runCall();
};

class SysPRead: public SysCall{
  private:
    int fd, num, off;
    char buf[1000];
  public:
    SysPRead(unsigned long s, int v, int f, const int n, int o);

    int runCall();
};

class SysWrite: public SysCall{
  private:
    int fd, num;
    char buf[1000];
  public:
    SysWrite(unsigned long s, int v, const int f, int n);

    int runCall();
};

class SysPWrite: public SysCall{
  private:
    int fd, num, off;
    char buf[1000];
  public:
    SysPWrite(unsigned long s, int v, int f, const int n, int o);

    int runCall();
};

class SysUnlink: public SysCall{
  private:
    char path[100];
  public:
    SysUnlink(unsigned long s, int v, char *p);

    int runCall();
};

class SysOpen: public SysCall{
  private:
    char path[100];
    int flags, mode;
  public:
    SysOpen(unsigned long s, int v, char * p, int f, int m);

    int runCall();
};

class SysClose: public SysCall{
  private:
    int fd;
  public:
    SysClose(unsigned long s, int v, int f);

    int runCall();
};

class SysCreat: public SysCall{
  private:
    char path[100];
    int mode;
  public:
    SysCreat(unsigned long s, int v, char *p, int m);

    int runCall();
};

class SysWritev: public SysCall{
  public:
    SysWritev(unsigned long s, int v);

    int runCall();
};

class SysReadv: public SysCall{
  public:
    SysReadv(unsigned long s, int v);

    int runCall();
};

class SysLink: public SysCall{
  private:
    char newp[100], oldp[100];
  public:
    SysLink(unsigned long s, int v, char * o, char * n);

    int runCall();
};

class SysSymlink: public SysCall{
  private:
    char newp[100], oldp[100];
  public:
    SysSymlink(unsigned long s, int v, char * o, char * n);

    int runCall();
};

class SysMkdir: public SysCall{
  private:
    char path[100];
    int mode;
  public:
    SysMkdir(unsigned long s, int v, char * p, int m);

    int runCall();
};

class SysRmdir: public SysCall{
  private:
    char path[100];
  public:
    SysRmdir(unsigned long s, int v, char * path);

    int runCall();
};

class SysMknod: public SysCall{
  private:
    char path[100];
    int mode, dev;
  public:
    SysMknod(unsigned long s, int v, char * path, int mode, int dev);

    int runCall();
};

class SysRename: public SysCall{
  public:
    SysRename(unsigned long s, int v);

    int runCall();
};

class SysChdir: public SysCall{
  public:
    SysChdir(unsigned long s, int v);

    int runCall();
};

#endif
